/*
 * EnigmaGM - A feature rich guild management system.
 * Copyright (C) 2007 ajiaojr.
 * 
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 * 02110-1301, USA.
 */
package org.ajiaojr.enigmagm.db;

import org.ajiaojr.enigmagm.db.mysql.MySQLCharacterDAOImpl;
import org.ajiaojr.enigmagm.db.mysql.MySQLEventDAOImpl;
import org.ajiaojr.enigmagm.db.mysql.MySQLItemDAOImpl;
import org.ajiaojr.enigmagm.db.mysql.MySQLPointDAOImpl;
import org.ajiaojr.enigmagm.db.mysql.MySQLPointSystemDAOImpl;
import org.ajiaojr.enigmagm.db.mysql.MySQLPurchaseDAOImpl;
import org.ajiaojr.enigmagm.db.mysql.MySQLRaidDAOImpl;
import org.ajiaojr.enigmagm.db.mysql.MySQLUserDAOImpl;

public class DAOManager {
  private static final DAOManager instance = new DAOManager();

  public static DAOManager getInstance() {
    return instance;
  }

  private CharacterDAO characterDAO;

  private EventDAO eventDAO;

  private PointDAO pointDAO;

  private PointSystemDAO pointSystemDAO;

  private PurchaseDAO purchaseDAO;

  private RaidDAO raidDAO;

  private UserDAO userDAO;

  private ItemDAO itemDAO;

  private DAOManager() {
    userDAO = new MySQLUserDAOImpl();
    raidDAO = new MySQLRaidDAOImpl();
    characterDAO = new MySQLCharacterDAOImpl();
    pointDAO = new MySQLPointDAOImpl();
    purchaseDAO = new MySQLPurchaseDAOImpl();
    eventDAO = new MySQLEventDAOImpl();
    pointSystemDAO = new MySQLPointSystemDAOImpl();
    itemDAO = new MySQLItemDAOImpl();
  }

  public CharacterDAO getCharacterDAO() {
    return characterDAO;
  }

  public EventDAO getEventDAO() {
    return eventDAO;
  }

  public PointDAO getPointDAO() {
    return pointDAO;
  }

  public PointSystemDAO getPointSystemDAO() {
    return pointSystemDAO;
  }

  public PurchaseDAO getPurchaseDAO() {
    return purchaseDAO;
  }

  public RaidDAO getRaidDAO() {
    return raidDAO;
  }

  public UserDAO getUserDAO() {
    return userDAO;
  }

  public void setCharacterDAO(CharacterDAO characterDAO) {
    this.characterDAO = characterDAO;
  }

  public void setEventDAO(EventDAO eventDAO) {
    this.eventDAO = eventDAO;
  }

  public void setPointDAO(PointDAO pointDAO) {
    this.pointDAO = pointDAO;
  }

  public void setPointSystemDAO(PointSystemDAO pointSystemDAO) {
    this.pointSystemDAO = pointSystemDAO;
  }

  public void setPurchaseDAO(PurchaseDAO purchaseDAO) {
    this.purchaseDAO = purchaseDAO;
  }

  public ItemDAO getItemDAO() {
    return itemDAO;
  }

  public void setItemDAO(ItemDAO itemDAO) {
    this.itemDAO = itemDAO;
  }
}
